﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using API_test.DAL;
using API_test.Model;

namespace API_test.BLL
{
    public class CustomerBLL
    {
        CustomerDAL customerDAL = new CustomerDAL();
        public int Login(UserInfo user)
        {
            int count = customerDAL.UserLogin(user);

            return count;

        }
        //全部数据   
        public void Insert(Customer customer)
        {
            customerDAL.Insert(customer);
        }
        public void Delete(int id)
        {
            customerDAL.DeleteById(id);
        }
        public void Update(Customer customer)
        {
            customerDAL.Update(customer);
        }
        public object LoadGetAllData()
        {
            object a = customerDAL.GetAllData();
            return a;

        }
        public object LoadGetDataById(int id)
        {
            object b = customerDAL.GetDataById(id);
            return b;

        }
        public object LoadGetDataBySex(string sex)
        {
            object c = customerDAL.GetDataBySex(sex);
            return c;
        }
        public object LoadGetDataByAge(int Age)
        {
            object d = customerDAL.GetDataByAge(Age);
            return d;
        }
        public object LoadGetDataByDepartment(string Department)
        {
            object e = customerDAL.GetDataByDepartment(Department);
            return e;
        }
    }
}
